<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('salesman_withdrawal/index')}">用户提现列表</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('salesman_withdrawal/index')}">
            名称:
            <input type="text" class="form-control" name="title" style="width: 200px;" value="{:input('request.title/s','')}" placeholder="请输入内容">
            提现日期:
            <input type="text" class="form-control js-bootstrap-date" name="date" style="width: 200px;" value="{:input('request.date/s','')}" placeholder="请输入内容" autocomplete="off">
            财务审核状态
            <select name="status" class="form-control">
            	<option value="">请选择</option>
            	<option value="1" <if input('status') != '' && input('status') == 1>selected</if> >待审核</option>
            	<option value="2" <if input('status') != '' && input('status') == 2>selected</if> >已通过</option>
            	<option value="3" <if input('status') != '' && input('status') == 3>selected</if> >已驳回</option>
            </select>
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('salesman_withdrawal/index')}">清空</a>
            待审批总提现金额：{$sum}
        </form>
        <form class="js-ajax-form" action="" method="post">
        	<div class="table-actions">
	        	<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
	                    data-action="{:url('salesman_withdrawal/batch',array('act'=>'yes'))}" data-subcheck="true">通过
	            </button>
	            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
	                    data-action="{:url('salesman_withdrawal/batch',array('act'=>'no'))}" data-subcheck="true">拒绝
	            </button>
            </div>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="15">
	                    <label>
	                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
	                    </label>
	                </th>
					<th width="50">ID</th>
					<th>用户</th>
					<th>类型</th>
					<th>姓名</th>
					<th>账号</th>
					<th>备注</th>
					<th>打款金额（提现金额-提现手续费）</th>
					<th>申请时间</th>
					<th>审核状态</th>
					<th>完成时间</th>
					<th width="140">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
					<tr>
						<td>
							<if $vo.status == 1>
	                        	<input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}">
	                    	</if>
	                    </td>
						<td>{$vo.id}</td>
						<td>{$vo.salesman.name}|{$vo.salesman.mobile}</td>
						<td>{$vo.type_text}</td>
						<td>{$vo.name}</td>
						<td>{$vo.account}</td>
						<td></td>
						<td>￥{$vo.amount-$vo.commission_amount}（￥{$vo.amount}-￥{$vo.commission_amount}）</td>
						<td>{$vo.create_time}</td>
						<td>{$vo.status_text}</td>
						<td>{$vo.finish_time}</td>
						<td>
							<if $vo.status == 1>
								<a class="btn btn-xs btn-success js-ajax-dialog-btn" href="{:url('salesman_withdrawal/examine',array('id'=>$vo['id'],'act'=>'yes'))}">审核通过</a>
								<a class="btn btn-xs btn-success js-ajax-dialog-btn" href="{:url('salesman_withdrawal/examine',array('id'=>$vo['id'],'act'=>'no'))}">审核不通过</a>
							</if>
						</td>
					</tr>
				</foreach>
			</tbody>
		</table>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>